DED

Section: User Commands (1)
Updated: Utah 4/27/84
Index Return to Main Contents
 

NAME

ded - directory editor  

SYNOPSIS

ded
[ -[s|r][fnsrwd] ] [ -w[f|h|Number] ] [ -xPattern ] [ dir-name|file-list ]
 

DESCRIPTION

Ded displays a long-form ls directory listing on the screen of a display terminal and allows you to 'edit' and peruse that listing by moving up and down it, deleting, editing, and displaying entries. Normally the index is displayed in one window and file perusal done in the other. With no string argument, the connected directory is used. With one string argument, the argument is interpreted as a directory and it is used. With multiple string arguments, they are interpreted as filenames.

Options, which are inherited by recursive invocations of ded:

-[sr][f|n|s|r|w|d]
Sort or reverse sort by Filename, filename as Number, Size, Read date, Write date, or directory order (no sort) respectively. "Normal sort" is the order you are most likely to desire, so is largest first for size, and most recent for read and write date sorts. Default is to sort by filename.
-w[f|h|Number]
Use Number lines for the directory index window, reserving the other half for quick file display. f means use the full screen for the index. h means use half of the screen for the index, and is the default.
-xPattern
Pattern is contiguous to the -x option and signifies the file suffixes to be eXcluded from the display. Separate the suffixes by the | character. For example, ded "-x.o|.mo" will exclude all .o and .mo files from ded's display. It is wise to surround this option by quotes to prevent the shell from interpreting it.

From left the index fields are: file mode, link count, owner, size, write date and name. Executable files are tagged with a '*', directories with a '/', symbolic links to non-directories with a '@', and symlinks to directories with a '>'. The bottom half of the screen is used for displaying files via the 't'ype command and for short command execution. If there are too many files to all fit on one window, more windows are allocated. The 'f' and 'b' commands can be used for stepping forward and backward windows.

Command list

Motion Commands:

<cr>

<lf>

j

^N
steps to the next file.
-

<backspace>

k

^P
steps to previous file.
^F

^V

f
goes forward a window, leaving a one line overlap.
^B

Meta-V

b
goes backward a window, leaving a one line overlap. Meta-V only works at Utah.
1
goes to the first entry of the first screen.
G
goes to the last entry of the last screen.
/
does a forward regular-expression search of the filenames starting with the current entry, and positions the cursor on that entry. If nothing is entered to the prompt, the last regular expression is used, and the search starts at the next entry.
?
does a reverse regular expression search.

General Control:

Q

q
exits the program, displaying files marked for deletion and requiring confirmation before deleting them. If no confirmation is given (typing anything other than y), ded goes back to its display. When many files are to be deleted, ded does the deletions asyncronously unless it is top-level and can be ^Z'ed and backgrounded by the user.
x
aborts completely out of ded. No deletions are done.
^Z
stops ded.
h
displays a help file.
!

%
prompts for a system command to invoke. Unless escaped via '\', all % characters in the command itself are replaced with the relative pathname of the current entry, all # chars are replaced with just the trailing filename component (what you see on the screen), and all @ characters are replaced with the relative name of the directory whose index is currently being displayed. "Relative" means relative to your current working directory, which does not change as you descend a hierarchy. When invoked via '!' the command is executed in the other window, if it exists, and can result in garbaging of the display if it has much output. This is designed for "action" commands, e.g. "mv". When invoked via '%' the screen is cleared before execution and re-displayed afterwards.
.
Repeats the previous ! or % shell command, substituting from the current entry for any special chars (%#@) in the original command.

Index Display

l
re-stats the current entry and redisplays that line. If the file has disappeared, a '-' sign appears next to the file name.
L
all the entries on the current screen are re-stat'ed and redisplayed.
^L
refreshes the screen.
r

s
sorts the file list by various fields: filename, filename treated as a number, read date, size, write date. Only the first letter (e.g. f, n, r, s, or w) is required after giving the r and s commands. s sorts in increasing alphabetic, decreasing size, newest to oldest dates. r reverses the sense of s. For the f, n, s, and w orders, the date field is the write date. For the r subcommand, the date field is the read date. Whenever a sort is done, you are positioned at the top of the list afterwards. A proposed sort can be aborted via ^G.

Actions on current entry

d
marks the current entry for deletion. Upon exit and confirmation, this entry will be deleted. WARNING: this includes directories! If it is a directory, everything in it and underneath it will be removed. For symbolic links, only the link is removed, not its target.
u
undeletes the current entry, if it was previously marked for deletion.
t

T
types the file out to the terminal. Little 't' specifies that in two-window mode, the bottom window be used, pausing after each screenful, and wrapping long lines. The type-out may be interrupted by the "Interrupt" character (^C), or by 'q' when the file is displayed in the bottom window. Capital 'T' says to use the full screen; essentially just a "cat" of the file.
m
runs the local pager upon the current file. As distributed, the default is Berkeley's more program.
e
runs the editor defined in your EDITOR environment variable upon the current file. If EDITOR is not defined, "vi" ("little emacs" at Utah) is used. However, if the current file is a directory or a symlink to a directory it is not edited, but rather, a recursive ded is done upon that directory. In this manner, you can examine the contents of that directory and thus move down the directory hierarchy.
p

P
prints the current file on the line-printer. At Utah, 'p' prints in small font (pr2) while 'P' gets normal font size.
 

FILES

/usr/local/lib/ded.hlp help file for ? and h  

SEE ALSO

ls(1)  

DIAGNOSTICS

The error messages are basically self-explanatory.  

AUTHORS

Stuart Mclure Cracraft
Jay Lepreau  

BUGS

Should use curses!

Needs a command to move the current entry to the top of the screen.

Would be nice to be able to change file modes by editing the mode field directly.

When tabs are in a line displayed via the 't' command, the line may wrap one character early.


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
AUTHORS
BUGS

This document was created by man2html, using the manual pages.
Time: 22:49:47 GMT, December 11, 2024